from operator import index 

import pandas as pd
import numpy as np
from sqlalchemy import column

df = pd.DataFrame({'num1':[1,np.nan,3],'num2':[4,5,np.nan],'num3':[7,8,9]})
print(df)
print(df.isnull())
print(df.dropna())##删除空值
print(df.dropna(thresh=1))
result =df.stack()
print(result)
df1 =pd.DataFrame([[12,34,34,33],[23,44,25,42]],
index=['男生人数','女生人数'],
columns=[['a','a','c','c'],['v','n','v','n']])
print(df1)
print(df1.stack())